<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<sj:div>
	<fieldset class="ui-widget ui-widget-content ui-corner-all"
		style="padding: 10px"><legend
		class="ui-state-default ui-corner-all">&nbsp;&nbsp;&nbsp;Debates&nbsp;&nbsp;&nbsp;</legend>
	<table width="100%">	
		<tr>
		<td align="right" colspan="2">
			<sj:a href="manterdebate!editDebate?idEstande=%{idEstande}" targets="mainestande" indicator="myDefaultIndicator" errorText="Desculpe sua conexão parece estar com problemas." errorElementId="divError"><button class="ui-state-default ui-widget-content ui-corner-all">Inserir Debate</button></sj:a>
		</td>
	</tr>
		<s:if test="%{lista.size > 0}">
			<s:set value="lista" name="debates" />

			<s:iterator value="debates">
				<tr>					
					<td width="30%" style="min-width: 300px"><s:if test="%{donoDiscussao.foto == null || donoDiscussao.foto.url.isEmpty()}" ><img src='images/clientes.jpg' title="${donoDiscussao.nome}" width="20x" height="30px"></s:if>
					<s:else><img src="${donoDiscurssao.foto.url}" title="${donoDiscussao.nome}" width="20px" height="30px"></s:else><font size="1"><b>${donoDiscurssao.nome} </b><s:date name="dtCriacao" format="dd/MM/yyyy hh:mm"/></font></td>
					<td width="600px"><div style="max-width: 600px; overflow: hidden;">
							<sj:a indicator="myDefaultIndicator" errorText="Desculpe sua conexão parece estar com problemas." errorElementId="divError"
								href="listarcomentariosfeira?idEstande=%{idEstande}&idDebate=%{id}"
								targets="mainestande">
									<i>${descricao}</i>
							</sj:a>
						  </div>
					</td>
				</tr>
				<tr>
				<td colspan="2">
					<br>
					<hr>					
				</td>
				</tr>

			</s:iterator>
		</s:if>
		<s:else>
		<tr>
		<td>
			Não há Debates registrados neste estande ainda.
		</td>
		<tr>	
		</s:else>
		
	</table>
	</fieldset>
</sj:div>
